<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	function axios(method,url){
		return new Promise((resolve,reject)=>{
			const xhr = new XMLHttpRequest;
			xhr.responseType = "json";
			xhr.open(method,url);
			xhr.send();
			xhr.onload = function(){
				resolve({
					data:xhr.response
				});
			}
		})
	}
	// axios("get","http://zhangpeiyue.com:3000/scoreList").then(value=>{
	// 	console.log(value.data);
	// })
	
	// axios("get","http://zhangpeiyue.com:3000/scoreList").then(({data})=>{
	// 	console.log(data);
	// })
	
	(async function(){
		const {data} = await axios("get","http://zhangpeiyue.com:3000/scoreList");
		console.log(data);
	})();
</script>
</html>